//#include <bits/stdc++.h>
#include <iostream>
#include <iomanip>
using namespace std;
const int N = 1e3+10;
double d[N][N];
int main() {
//    ios::sync_with_stdio(false);cin.tie(nullptr);
    int n, s; cin >> n >> s;
    for (int i = n; i >=0; --i) {
        for (int j = s; j >=0 ; --j) {
            if(i==n && j==s) continue;
            double a = 1.0*i/n, b = 1.0*j/s;
            double A = a*b;
            double B = (1-a)*b;
            double C = a*(1-b);
            double D = (1-a)*(1-b);
            if(A==0)
                d[i][j] = B*(d[i+1][j] + 1) + C*(d[i][j+1] + 1) + D*(d[i+1][j+1] + 1);
            else
                d[i][j] = 1.0/(1-A)*(A + B*(d[i+1][j] + 1) + C*(d[i][j+1] + 1) + D*(d[i+1][j+1] + 1));

        }
    }
    cout << setprecision(4) << fixed << d[0][0];
    return 0;
}